package com.banyuan.HomeWork.string;

//计算字符串“ I love Java  “首尾共有多少个空白字符；
public class four {
    public static void main(String[] args) {
        String s = " I love Java  ";
        int a = s.length();
        int b = s.strip().length();
        System.out.println("共有" + (a - b) + "个空白字符。");

    }
}

//isBlank判断是不是空白字符